<?php require 'Public/header.php';?>
<body>
<link rel="stylesheet" type="text/css" href="Public/org/home/css/list.css"/>

<?php require 'Public/homeTop.php';?>     
    <!--列表分类-->
    	<div class="sortArea">
    		<div class="sort">
    			<p class="sortTitle">当前位置: <strong>所有分类</strong></p>
    			<!-- <div class="sortBrand">
    				
    				<section class="Title">
    					品牌：
    				</section>
    				
    				<section class="brandCon">
    					<a href="">班尼路(Baleno)</a>
    				</section>    				
    			</div> -->
                <?php foreach($searchAttr as $k => $sa):?>
    			<div class="priceList">
    				<!--title-->                    
    				<section class="Title">
    					<?php echo $sa['attr_name']?>
    				</section>                   
    				<!--价钱框-->                    
    				<section class="priceCon">                        
    					<ul>
                            <li>
                                <?php echo getAttrUrl($k,0,'全部')?>
                            </li>
                            <?php foreach($sa['attr_value'] as $v):?>
    						<li>                                   
                                <?php echo getAttrUrl($k,$v['attr_value'],$v['attr_value'])?>
    						</li>
                            <?php endforeach;?>
    					</ul>                        
    				</section>                    
    			</div>
            <?php endforeach;?>
    		</div>
    	</div>
    <!--列表分类end-->
    
    <!--列表bar-->
    	<div class="listBarArea">
    		<div class="listBar">
    			<section class='tagName'>
    				<a href="#">全部商品</a>
    			</section>
    			<section class="barName">
	    			<ul>
	    				<li><a href="#">默认</a><i class="icon-arrow-down"></i></li>
	    				<li><a href="#">最新</a><i class="icon-arrow-up newup"></i></li>
	    				<li class="price">
	    					<a href="#">价格</a><i class="icon-arrow-up"></i>
	    					<i class="icon-caret-down"></i>
	    				</li>
	    			</ul>
	    		</section>
    		</div>    		
    	</div>
    <!--列表bar end-->
    
    <!--商品列表-->
    	<div class="shopListArea">
    		<div class="shopList">
    			<!--商品-->
                <?php $d=0;?>
                <?php foreach($goods as $g):?>
                    <?php if($d==1||$d==3):?>
    			<figure class="mrl">
    				<a href="<?php echo U('Detail/show',array('goods_id'=>$g['goods_id']))?>"><img src="<?php echo $g['list_pic']?>"/></a>
    				<p><?php echo $g['goods_name']?></p>
    				<figcaption>
    					售价￥<?php echo $g['price']?>
    				</figcaption>	
    			</figure>
                <?php else:?>
                   <figure>
                        <a href="<?php echo U('Detail/show',array('goods_id'=>$g['goods_id']))?>"><img src="<?php echo $g['list_pic']?>"/></a>
                        <p><?php echo $g['goods_name']?></p>
                        <figcaption>
                            售价￥<?php echo $g['price']?>
                        </figcaption>   
                    </figure>
                <?php endif;?>
                <?php $d++;?>
                <?php endforeach;?>
    		</div>
    		<!--分页-->
    		<div class="shopListPage">                
    			<section class="page">
                    <?php echo $page?>
    				<!-- <span class="last">上一页</span>
    				<span>共1页</span>
    				<span class="next">下一页</span>
    				<span>到第<span class="con">1</span>页</span>    				
    				<button>确定</button> -->
    			</section>
    		</div>
    	</div>
    <!--商品列表end-->
    <!-- 引用页脚文件 -->
    <?php require 'Public/footer.php';?>  
</body>
</html>
